-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLR hosting #9572
base: main
Are you sure you want to change the base?
CLR hosting #9572
Conversation
cbc08f4
to
0370d7d
Compare
* Add a version script which hides all the symbols except for the handful we have to export. * Enable exceptions
In process to remove object instances for a slightly faster startup
Build is broken atm
c085352
to
13bbd93
Compare
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.debug.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.release.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.release.so" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fixing this up in #9583, but maybe I can split up part of it into a smaller PR.
13bbd93
to
82cfb8a
Compare
* Add a version script which hides all the symbols except for the handful we have to export. * Enable exceptions
The build is broken atm, need to move things around a bit.
* main: Bump to dotnet/sdk@2d6bc4f67d 10.0.100-alpha.1.25060.8 (#9669) [templates] Default `$(SupportedOSPlatformVersion)=24`. (#9656) Bump to dotnet/sdk@a93a592ce9 10.0.100-alpha.1.25056.1 (#9395) LEGO: Pull request (#9667) [tests] use the 'TestName' property (#9664)
* main: Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 10814362 (#9673)
* main: [ci] Add template for setting JAVA_HOME vars (#9671) Bump com.android.tools.build:manifest-merger from 31.7.3 to 31.8.0 (#9678) Bump to dotnet/sdk@2dd591056f 10.0.100-alpha.1.25062.16 (#9679) Bump com.android.tools:r8 from 8.5.35 to 8.7.18 (#9677) Bump to dotnet/java-interop@4f06201 (#9676) Bump to dotnet/android-api-docs@492e524d (#9668) [build] Support JDK-21 (#9672)
At least files end up where they should be :P
* main: [illink] consolidate & remove hardcoded assembly names (#9662) Bump to NuGet/NuGet.Client@aa7eb998 (#9682) [Microsoft.Android.Sdk.Analysis] fix global types (#9680)
@@ -216,5 +218,6 @@ | |||
<ItemGroup> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="Mono" /> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="NativeAOT" /> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="CoreCLR" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't figure out if we should case it CoreClr
or CoreCLR
:
- https://grep.app/search?q=CoreCLR&case=true&filter[repo][0]=dotnet/runtime
- https://grep.app/search?q=CoreClr&case=true&filter[repo][0]=dotnet/runtime
I found both, so we can probably decide which we prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like CoreCLR better, since CLR is an acronym
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' " Include="libnet-android.debug" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' " Include="libnet-android.release" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'CoreCLR' " Include="libmono-android.debug" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'CoreCLR' " Include="libmono-android.release" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, $(AndroidRuntime)
isn't defined for customer's project builds. I think it would always be blank?
Right now, we only have these:
$(UseMonoRuntime)=true
$(_AndroidNativeAot)=true
Maybe we need to figure out what property xamarin/xamarin-macios uses to identify CoreCLR? You can use it for macOS, to choose between Mono & CoreCLR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it would always be blank now and I think we should always expect a value in there. The macios way looks fine.
<_AndroidUseCLR Condition=" '$(AndroidRuntime)' == 'CoreCLR' ">True</_AndroidUseCLR> | ||
<_AndroidUseCLR Condition=" '$(AndroidRuntime)' != 'CoreCLR' ">False</_AndroidUseCLR> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(AndroidRuntime)
is probably always blank in customer's Android projects, but is this the property to select a runtime? Should the property be in DefaultProperties.targets
?
Maybe we should align with xamarin/xamarin-macios?
Ok, here is what we should do for MSBuild properties for now:
We could remove |
I like |
Context: #9572 (comment) Context: https://github.com/xamarin/xamarin-macios/blob/2009c571aa8a975ab0e0b1785e5484dbd64d6f9b/dotnet/targets/Xamarin.Shared.Sdk.targets#L1004-L1006 To align with xamarin/xamarin-macios, the following public MSBuild properties can be used to select a runtime for iOS, macOS, etc.: * `$(UseMonoRuntime)=true`: MonoVM * `$(UseMonoRuntime)=false`: CoreCLR * `$(PublishAot)=true`: NativeAOT * Defaults if blank, select MonoVM Introduce a private `$(_AndroidRuntime)` property we can use throughout our build to know which runtime is being targetted. This way, if a new property is designed in the future, we can keep using `$(_AndroidRuntime)` and simply update the defaults.
No description provided.